package Proxy;

import Proxy.service.AliMsmService;
import Proxy.service.MsmService;
import Proxy.service.impl.MsmServiceImpl;

/**
 * @author xinxing
 * @date 2023/2/6 17:10
 */
public class ProxyMain {

    public static void main(String[] args) {

        AliMsmService aliMsmService = (AliMsmService) CglibFactory.getProxy(new AliMsmService());
        aliMsmService.sendMessage("短信");

        MsmService msmService = (MsmService) CglibFactory.getProxy(new MsmServiceImpl());
        msmService.sendMsg("邮件");

    }

}
